import {request} from './requst.js'

// 登录方法
export function login(username, password, code, uuid) {
  const data = {
    username,
    password,
    code,
    uuid
  }
  return request('/login', 'POST', data,'application/json;charset=UTF-8',false)
}

// 注册方法
export function register(data) {
	  return request('/register', 'POST', data,'application/json;charset=UTF-8',false)
}

// 获取用户详细信息
export function getInfo() {
	return request('/getInfo')
}

// 退出方法
export function logout() {
	  return request('/logout', 'POST')
}

// 获取验证码
export function getCodeImg() {
	return request('/captchaImage', 'GET', {},'application/x-www-form-urlencoded;charset=UTF-8',false)
}
 